package com.thorw;

public class Demo2 {
    public static void main(String[] args) {

       try{
           method();
       }catch (ArrayIndexOutOfBoundsException e){
           System.out.println("数组越界");
       }
    }
    public static void method(){
        int []arr={1,2,3,4,5,6,7};
        System.out.println(arr[10]);
    }
}
